retain_all_copy
Return a new list whose elements are those found in both this list and the given collection, or in other words, the intersection of this list and the given collection.
Return
a new list whose elements are the intersection of this list and the given collection
a.retain_all_copy(b) is equivalent to a & b, where a and b are lists.
Examples:
[1].retain_all_copy([1])returns[1][1].retain_all_copy([2])returns[][1, 2, 3].retain_all_copy([2, 3, 4])returns[2, 3]
Since
0.14.16
Parameters
values
the other collection